<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script>
        function Customer() {
            this.nickName = '小李';
        }

        // 使用箭头函数定义原型对象中的方法
        Customer.prototype.show = () => {
            console.log(this.nickName);
        }
        var cust1 = new Customer();
        cust1.show();// undefined
    </script>
</head>
<body>
    
</body>
</html>